-
Notifications
You must be signed in to change notification settings - Fork 101
Fix package data #2127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix package data #2127
Conversation
cd0ec58 to
3a07345
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
pyproject.toml
Outdated
| find = {} | ||
| [tool.setuptools.packages.find] | ||
| include = [ 'openff.toolkit*' ] | ||
| exclude = [ 'openff.toolkit.data' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This prevents files in openff/toolkit/data from being included in Python and Conda packages by default. These files take up the more space the disk than the Python files defining the package itself (this can be turned off):
This may not be desired, and these lines offer control over what is and is not packaged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the summary. Unfortunately I think this would prevent certain files needed for examples from being found by get_data_file_path, for example here:
| "pdb_file_path = get_data_file_path(\"systems/test_systems/1_cyclohexane_1_ethanol.pdb\")\n", |
get_data_file_path.
We could change the openff-toolkit-examples package to contain these files even though openff-toolkit-base wouldn't, or change the examples helper to fetch them, or prune these directories with more granularity, but I don't think the juice is worth the squeeze.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, that seems fair
j-wags
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, unfortunately we need to keep the data dir, but happy to take the packaging updates
pyproject.toml
Outdated
| find = {} | ||
| [tool.setuptools.packages.find] | ||
| include = [ 'openff.toolkit*' ] | ||
| exclude = [ 'openff.toolkit.data' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the summary. Unfortunately I think this would prevent certain files needed for examples from being found by get_data_file_path, for example here:
| "pdb_file_path = get_data_file_path(\"systems/test_systems/1_cyclohexane_1_ethanol.pdb\")\n", |
get_data_file_path.
We could change the openff-toolkit-examples package to contain these files even though openff-toolkit-base wouldn't, or change the examples helper to fetch them, or prune these directories with more granularity, but I don't think the juice is worth the squeeze.
pyproject.toml
Outdated
| find = {} | ||
| [tool.setuptools.packages.find] | ||
| include = [ 'openff.toolkit*' ] | ||
| exclude = [ 'openff.toolkit.data' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(blocking) Per my other comment
| exclude = [ 'openff.toolkit.data' ] |
openforcefield/status#122
The key change is that Setuptools crawls for files in
openff/toolkit/instead of the root of the directory (current behavior). This meansdocs.conf.pyis no longer packaged, which it shouldn't be.